Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
babel-preset-jest
Advanced tools
> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest).
Babel preset for all Jest plugins. This preset is automatically included when using babel-jest.
$ npm install --save-dev babel-preset-jest
.babelrc
(Recommended).babelrc
{
"presets": ["jest"]
}
$ babel script.js --presets jest
require("babel-core").transform("code", {
presets: ["jest"]
});
jest 16.0.0
jest <pattern>
is now case-insensitive.it.only
, it.skip
, test.only
, test.skip
and xtest
.--testNamePattern=pattern
or -t <pattern>
to run individual tests in test files.a
, o
, p
, q
or enter
while tests are running in the watch mode, the test run will be interrupted.--bail
now works together with --watch
.test.concurrent
for concurrent async tests..jsx
extension.jest.clearAllMocks
to clear all mocks manually.jest-snapshot
can now be more easily integrated into other test runners and used in other projects.fit
or when an error is thrown in a test.toHaveBeenLastCalledWith
, toHaveBeenCalledWith
, lastCalledWith
and toBeCalledWith
failure messages.toBeInstanceOf
matcher.toContainEqual
matcher.toThrowErrorMatchingSnapshot
matcher.moduleNameMapper
resolution.setupTestFrameworkScriptFile
script to make it easier to use chai together with Jest.--findRelatedTests <fileA> <fileB>
cli option to run tests related to the specified files.jest.deepUnmock
to babel-plugin-jest-hoist
.jest.runTimersToTime
which is useful together with fake timers.FAQs
> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/jestjs/jest/tree/main/packages/babel-jest).
The npm package babel-preset-jest receives a total of 19,627,542 weekly downloads. As such, babel-preset-jest popularity was classified as popular.
We found that babel-preset-jest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.